﻿using ArtClub.Model;
using System.Collections.Generic;

namespace ArtClub.Controller
{
    public interface IMemberCtr
    {
        /// <summary>
        /// Returns a list of members found in the database.
        /// </summary>
        /// <returns>a list containing all members</returns>
        List<Member> ListMembers();

        /// <summary>
        /// Returns a list of members found in the database.
        /// </summary>
        /// <param name="name">Part of or full name to search by. The word case is ignored</param>
        /// <returns>a list containing one or more members</returns>
        List<Member> ListMembersByName(string name);

        /// <summary>
        /// Returns a list of members found in the database.
        /// </summary>
        /// <param name="email">Part of or full email to search by. The word case is ignored</param>
        /// <returns>a list containing one or more members</returns>
        List<Member> ListMembersByEmail(string email);

        /// <summary>
        /// Returns a list of members found in the database.
        /// </summary>
        /// <param name="minPoints">the minimum number of points a member must have</param>
        /// <returns>a list containing one or more members</returns>
        List<Member> ListMembersByPoints(int minPoints);

        /// <summary>
        /// Returns a member found in the database.
        /// </summary>
        /// <returns>the found member</returns>
        Member GetMember(int id);

        /// <summary>
        /// Add points to a member in the database.
        /// </summary>
        /// <param name="member">the member to get the points added</param>
        /// <param name="points">the number of points to be added</param>
        void AddPoints(Member member, int points);

        /// <summary>
        /// Remove points to a member in the database.
        /// </summary>
        /// <param name="member">the member to get the points removed</param>
        /// <param name="points">the number of points to be removed</param>
        void RemovePoints(Member member, int points);

		/// <summary>
		/// Creates a member.
		/// </summary>
		/// <param name="member">Member to create.</param>
        void CreateMember(Member member);

		/// <summary>
		/// Updates a member.
		/// </summary>
		/// <param name="member">Updated member.</param>
		void UpdateMember(Member member);

		/// <summary>
		/// Remove a member from the database.
		/// </summary>
		/// <param name="id">the id of the member to be removed</param>
		void DeleteMember(int id);
    }
}